Optimal. Leaf size=45 \[ \frac{\left (a^2-b^2\right ) \tan (e+f x)}{f}+\frac{(a+b)^2 \tan ^3(e+f x)}{3 f}+b^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.062085, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3191, 390, 203} \[ \frac{\left (a^2-b^2\right ) \tan (e+f x)}{f}+\frac{(a+b)^2 \tan ^3(e+f x)}{3 f}+b^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3191
Rule 390
Rule 203
Rubi steps
\begin{align*} \int \sec ^4(e+f x) \left (a+b \sin ^2(e+f x)\right )^2 \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (a+(a+b) x^2\right )^2}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \left (a^2-b^2+(a+b)^2 x^2+\frac{b^2}{1+x^2}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\left (a^2-b^2\right ) \tan (e+f x)}{f}+\frac{(a+b)^2 \tan ^3(e+f x)}{3 f}+\frac{b^2 \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=b^2 x+\frac{\left (a^2-b^2\right ) \tan (e+f x)}{f}+\frac{(a+b)^2 \tan ^3(e+f x)}{3 f}\\ \end{align*}
Mathematica [A] time = 0.324862, size = 57, normalized size = 1.27 \[ \frac{(a+b) \tan (e+f x) \sec ^2(e+f x) ((a-2 b) \cos (2 (e+f x))+2 a-b)+3 b^2 (e+f x)}{3 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.072, size = 76, normalized size = 1.7 \begin{align*}{\frac{1}{f} \left ( -{a}^{2} \left ( -{\frac{2}{3}}-{\frac{ \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{3}} \right ) \tan \left ( fx+e \right ) +{\frac{2\,ab \left ( \sin \left ( fx+e \right ) \right ) ^{3}}{3\, \left ( \cos \left ( fx+e \right ) \right ) ^{3}}}+{b}^{2} \left ({\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3}}-\tan \left ( fx+e \right ) +fx+e \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.47153, size = 72, normalized size = 1.6 \begin{align*} \frac{{\left (a^{2} + 2 \, a b + b^{2}\right )} \tan \left (f x + e\right )^{3} + 3 \,{\left (f x + e\right )} b^{2} + 3 \,{\left (a^{2} - b^{2}\right )} \tan \left (f x + e\right )}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.972, size = 169, normalized size = 3.76 \begin{align*} \frac{3 \, b^{2} f x \cos \left (f x + e\right )^{3} +{\left (2 \,{\left (a^{2} - a b - 2 \, b^{2}\right )} \cos \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}\right )} \sin \left (f x + e\right )}{3 \, f \cos \left (f x + e\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14529, size = 108, normalized size = 2.4 \begin{align*} \frac{a^{2} \tan \left (f x + e\right )^{3} + 2 \, a b \tan \left (f x + e\right )^{3} + b^{2} \tan \left (f x + e\right )^{3} + 3 \,{\left (f x + e\right )} b^{2} + 3 \, a^{2} \tan \left (f x + e\right ) - 3 \, b^{2} \tan \left (f x + e\right )}{3 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]